
<?php
error_reporting(E_ALL);

include_once('../controller/includes/db_access.php');

?>
<html>
<head>
<meta charset="utf-8" />
<!--[if lt IE 9]>
<script
src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="styles/style.css" type="text/css" />
<!--[if lte IE 7]>
<link rel="stylesheet" href="style_ie.css" />
<![endif]-->
<title>dbme!!!!</title>
</head>
<body>
<div id="bloc_page">
<header>

</header>  
 <nav>
    <?php include_once('header.php'); ?>
</nav>
 <section>
  <aside>
  <!--right side baar -->
       
        
   </aside>
    <article>
        
          <table id="vsTable">
                <tr>
                 <td colspan="3" class="title" style="width: 100%;"><div><a href="product_add.php" >add product</a></div></td>
                </tr>
       
                <?php
// put your code here
                $q = new Query;
                $q
                        ->select('*'
                        )
                        ->from('`product`')
                        ->order_by(
                                array(
                                    '`product`.`naam` ASC',
                                )
                        )
                        ->run();

                $result = $q->run();
                $count = $q->get_selected_count();

                if (!($result && $count > 0)) {
                    echo 'No users found.' . "\n";
                } else {
                    while ($rows = mysql_fetch_object($result)) {

            echo'<tr  class="second"><td style="width:60%; ">' . $rows->naam . '</div><div></td>
           <td  style="width:20%; "><div><a href="product_edit.php?pid=' . $rows->product_id . '">detail</a></div></td>
            <td style="width: 20%; "><div><a href="product_del.php?pid=' . $rows->product_id . '">delete</a></div></td></tr>';
                    }
                }
                ?>

            </tbody>
        </table>
    </article>
 
    <aside>
  <!--right side baar -->
       
        
   </aside>
</section>
 
 <footer>  
<p>Lorem ipsum dolor sit amet...</p>
<p>Vivamus sed libero nec mauris pulvinar facilisis ut non sem...</p>
<p>Phasellus ligula massa, congue ac vulputate non, dignissim at augue...</p>
</footer>
</div>
</body>
</html>

 